Skip to content

Use the window.imagePath global for the base image path in examples if present.#637

Merged
cdcabrera merged 1 commit intopatternfly:masterfrom
bleathem:imagePath
Sep 28, 2017
Merged

Use the window.imagePath global for the base image path in examples if present.#637
cdcabrera merged 1 commit intopatternfly:masterfrom
bleathem:imagePath

Conversation

@bleathem
Copy link
Copy Markdown
Member

@bleathem bleathem commented Sep 28, 2017

This PR allows that patternfly.org site to override the image path used in some examples by specifying the IMAGE_PATH global variable.

<file name="script.js">
angular.module( 'patternfly.card' ).controller( 'CardDemoCtrl', function( $scope ) {
angular.module( 'patternfly.card' ).controller( 'CardDemoCtrl', function( $scope, $window ) {
var imagePath = $window.IMAGE_PATH || "img";
Copy link
Copy Markdown
Member

@jeff-phillips-18 jeff-phillips-18 Sep 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be consistent and use '/img'

Copy link
Copy Markdown
Member Author

@bleathem bleathem Sep 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was preserving what was previously present. Would you say img is expected to be correct over /img

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I would say 'img' is probably better, I'd just rather see consistency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Standardised on img.

function ($scope) {
angular.module('patternfly.navigation').controller('applicationLauncherController', ['$scope', '$window',
function ($scope, $window) {
$scope.imagePath = $window.IMAGE_PATH || "img";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and again...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...again, I was preserving what was previously present. Happy to converge on a single path with this PR though.

@cdcabrera cdcabrera merged commit d80f6e3 into patternfly:master Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants